package com.cz.fra.android;

import java.util.LinkedList;

import android.app.Activity;
import android.app.Application;

public class FishReportApplication extends Application {

	private static FishReportApplication instance;
	
	public LinkedList<Activity> listActivites = new LinkedList<Activity>();;
	
	public static FishReportApplication getInstance(){
		if(instance == null){
			return new FishReportApplication();
		}
		return instance;
	}
	
	@Override
	public void onCreate()
	{
		super.onCreate();
		instance = this;
	}
	
	public void addActivities(Activity activity){
		listActivites.add(activity);
	}
	
	public void exit()
	{
		for(Activity activity:listActivites)
		{
			activity.finish();
		}
		System.exit(0);
	}
	
}

